package com.bcxj.apidriver.client;

import com.bcxj.internalcommon.dto.ResponseResult;
import com.bcxj.internalcommon.entity.Car;
import com.bcxj.internalcommon.entity.DriverCarBindingRelationship;
import com.bcxj.internalcommon.entity.DriverUser;
import com.bcxj.internalcommon.entity.DriverUserWorkStatus;
import com.bcxj.internalcommon.response.DriverUserExistResponse;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

/**
 * ClassName: ServiceDriverUserClient
 * Package: com.bcxj.apidriver.client
 * Description:
 *
 * @Author BCXJ
 * @Create 2024/10/19 17:14
 * @Version 1.0
 * @Since 1.0
 */
@FeignClient( "service-driver-user")
public interface ServiceDriverUserClient {
    @PutMapping("/user")
    ResponseResult updateUser(@RequestBody DriverUser driverUser);

    @GetMapping("/check-driver/{driverPhone}")
    ResponseResult<DriverUserExistResponse> getUser(@PathVariable String driverPhone);

    @GetMapping("car")
    ResponseResult<Car> getCar(@RequestParam String carId);

    @PostMapping("/driver-user-work-status")
    ResponseResult updateDriverWorkStatus(@RequestBody DriverUserWorkStatus driverUserWorkStatus);

    @GetMapping("driver-car-binding-relationship")
    ResponseResult<DriverCarBindingRelationship> getDriverCarBindingRelationship(@RequestParam String driverPhone);
}
